<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>建一个6行4列的表格</title>
</head>
<body>
    <table border="1px">
        <tr>
            <th colspan="4">购物车</th>
        </tr>

        <tr>
            <th rowspan="2">名称</th>
            <th colspan="2">2020-3-1</th>
            <th rowspan="2">小计</th>
        </tr>
        <tr>
            <th>重量</th>
            <th>单价</th>
        </tr>

        <tr>
            <td>苹果</td>
            <td>3公斤</td>
            <td>5元/公斤</td>
            <td>15元</td>
        </tr>
        <tr>
            <td>香蕉</td>
            <td>2公斤</td>
            <td>6元/公斤</td>
            <td>12元</td>
        </tr>

        <tr>
            <td colspan="3" align="center">总价</td>
            <td>27元</td>
        </tr>
    </table>
</body>
</html>